package com.hr.dao;

import com.hr.entity.Comments;
import org.springframework.data.repository.CrudRepository;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/*
    Created with IntelliJ IDEA.
    @author: wang sir
    Date: 2021/7/19
    Time: 11:12
    To change this template use File | Settings | File Templates.
    Description: 
 */
public interface CommentsDao extends CrudRepository<Comments,Long> {

    /*
    * 查询指定新闻的所有新闻
    * */

    List<Comments> getAllByCnidOrderByCcreateDateDesc(Long cnid);

    /*
    *删除指定新闻的评论
    * */
    void deleteByCnid(Long nid);



}